<?xml version="1.0" encoding="ISO-8859-1" ?>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@page import="com.webapp.model.Advertisement, java.util.List" %>
<% 
	List list =  (List)session.getAttribute("ItemList");
%>
<!-- include moo talk header file -->
<%@ include file="MooTalkHeader.jsp" %>

		<div id="site_content_text">
			<h2>Item List</h2>
			<% if( list != null ) { %>
			<% for (int i = 0; i < list.size(); i++) { %>
				<p><%Advertisement a = (Advertisement)list.get(i);%></p>
				<p>Name: <%=a.getItemName()%></p>
				<p>Price: <%=a.getPrice()%></p>
				<p>Description: <%=a.getContent()%></p>
				<p><a href="AdClick.do?ad=<%=a.getAdvertisementId()%>">Buy Now!</a>
			<% }} %>
			
		</div>
		
<!--  include moo talk footer file -->
<%@ include file="MooTalkFooter.jsp" %>
